package com.ceshiren.hogwarts.wework;

import io.appium.java_client.AppiumDriver;

import java.util.ArrayList;
import java.util.List;

public abstract class ExceptionHandler {

    private static ArrayList<ExceptionHandler> exceptionHandlers;
    static int max_retry=3;
    static int retry=0;

    public Boolean isHit(String pageSource){
        return false;
    }
    public void handle(){

    }

    public void handle(AppiumDriver driver){

    }
    //将所有异常汇总
    public static List<ExceptionHandler> getAllExceptionHandler(){
        if (exceptionHandlers.size()==0){
            exceptionHandlers.add(new PopupExceptionHandler());
            exceptionHandlers.add(new AppupExceptionHandler());
        }

        return exceptionHandlers;
    }

}
